#!/usr/bin/node 

const fs = require('fs');

//没有命令参数，默认打印脚本文件内容
const filename = process.argv[2] || __filename;


//流方式打印文件内容
let stm = fs.createReadStream(filename);


stm.on('error', (e) => {
  console.error(e.message);
});

stm.pipe(process.stdout);
